package com.news.entity;

import java.util.Date;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.Email;
import org.springframework.format.annotation.DateTimeFormat;

public class Emp {

	private Integer empId;
	@NotNull
	private String ename;
	@Max(120)
	@Min(6)
	private Integer age;
	@Size(min = 2, max = 14)
	private String job;
	@Email
	private String email;
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@Past
	private Date birthday;
	
	
	public Integer getEmpId() {
		return empId;
	}
	public void setEmpId(Integer empId) {
		this.empId = empId;
	}
	public String getEname() {
		return ename;
	}
	public void setEname(String ename) {
		this.ename = ename;
	}
	public Integer getAge() {
		return age;
	}
	public void setAge(Integer age) {
		this.age = age;
	}

	public Emp() {
		super();
	}
	
	public String getJob() {
		return job;
	}
	public void setJob(String job) {
		this.job = job;
	}
	
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	@Override
	public String toString() {
		return "Emp [empId=" + empId + ", ename=" + ename + ", age=" + age
				+ ", job=" + job + ", email=" + email + ", birthday="
				+ birthday + "]";
	}

	
	
}
